package com.thinkpadteam.edugra;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageButton;
import android.widget.Toast;

import com.thinkpadteam.edugra.fragmentmakan.MainMakanFragment;
import com.thinkpadteam.edugra.fragmentmandi.MainMandiFragment;
import com.thinkpadteam.edugra.fragmentsekolah.MainSekolahFragment;
import com.thinkpadteam.edugra.game.GameBerhitung;
import com.thinkpadteam.edugra.game.GameMencocokkan;

public class MainLesson extends Activity{
	private ImageButton makan, belajar, mandi;
	
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.main_lesson);
		makan = (ImageButton)findViewById(R.id.btn_lesson_makan);
		belajar = (ImageButton)findViewById(R.id.btn_lesson_belajar);
		mandi = (ImageButton)findViewById(R.id.btn_lesson_mandi);
	}
	
	public void ChooseLessonMethod(View v){
		Intent intent = null;
		switch (v.getId()) {
		case R.id.btn_lesson_mandi:
			intent = new Intent(this, MainMandiFragment.class);
			intent.putExtra("materi", "mandi");
			break;
		case R.id.btn_lesson_belajar:
			intent = new Intent(this, MainSekolahFragment.class);
			intent.putExtra("materi", "sekolah");
			
			break;
		case R.id.btn_lesson_makan:
			intent = new Intent(this, MainMakanFragment.class);
			intent.putExtra("materi", "makan");
			break;	
		default:
			break;
		}
		intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_NEW_TASK);
		startActivity(intent);
	
	}
}
